<?php

namespace Xrfg\Api\Trading\Spot\Resources;

use App\Http\Resources\Resource;
use Xrfg\Core\Trading\Spot\Models\Kline;

class KlineResource extends Resource
{
    public function toArray($request)
    {
        /* @var Kline $this */
        return [
            'time' => $this->time_open,
            'open' =>  $this->price_open,
            'close' =>  $this->price_close,
            'high' =>  $this->price_high,
            'low' =>  $this->price_low,
            'volume' =>  $this->trades_number,
            'trades_total' =>  $this->trades_total,
            'trades_count' =>  $this->trades_count,
        ];
    }
}
